[Zend] phpUnit - assertQuery fails with

Posted by Rosina Bignall on Stack Overflow See other posts from Stack Overflow or by Rosina Bignall
Published on 2011-03-01T00:34:38Z Indexed on 2011/03/01 15:25 UTC
Read the original article Hit count: 275

Filed under:
|
|
|
|

I am having trouble with an assertQuery(). In the html I have (verified by outputting the body)

<input type="text" name="LASTNAME" id="LASTNAME" value="" maxlength="25" size="20" />

So I wrote a query for it to test to make sure this element exists and that the value is empty

    $this->assertQuery('input#LASTNAME[value=""]', 1);

PhpUnit says the assertion fails

Failed asserting node DENOTED BY input#LASTNAME[value=""] EXISTS

Can you give me some insight into why this assertion fails and how to write it properly?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about php

Related posts about testing